package com.fary.security.access.expression;

import com.fary.aop.framework.AopInfrastructureBean;
import com.fary.expression.EvaluationContext;
import com.fary.expression.ExpressionParser;
import com.fary.security.core.Authentication;

public interface SecurityExpressionHandler<T> extends AopInfrastructureBean {
	/**
	 * @return an expression parser for the expressions used by the implementation.
	 */
	ExpressionParser getExpressionParser();

	/**
	 * Provides an evaluation context in which to evaluate security expressions for the
	 * invocation type.
	 */
	EvaluationContext createEvaluationContext(Authentication authentication, T invocation);
}